package com.kd.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kd.enums.employee.EmployeeStatus;

import java.util.Date;

@TableName("employee")
public class Employee {
    @TableId(value = "eid", type = IdType.AUTO)
    private Integer eid;
    private String name;
    private String password;
    private String cardid;
    private String phone;
    private Date hiredate;
    private Integer status;//0离职/1休假/2在职
    private String image;
    private String address;
    private Integer permission;//0普通权限/1财务权限/2高层权限


    public int getEid() {
        return eid;
    }

    public void setEid(int mid) {
        this.eid = mid;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCardid() {
        return cardid;
    }

    public void setCardid(String cardid) {
        this.cardid = cardid;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Date getHiredate() {
        return hiredate;
    }

    public void setHiredate(Date hiredate) {
        this.hiredate = hiredate;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getPermission() {
        return permission;
    }

    public void setPermission(Integer permission) {
        this.permission = permission;
    }


    public boolean isActive() {
        return EmployeeStatus.ON_JOB.getCode().equals(this.status);
    }




}
